package com.seeyon.ctp.rest.resources;


import com.alibaba.fastjson.JSONObject;
import com.seeyon.apps.brwh.manager.SupplierCooperationService;

import com.seeyon.ctp.common.AppContext;
import com.seeyon.ctp.common.log.CtpLogFactory;

import org.apache.commons.logging.Log;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.Map;

/**
 * 供应商雷达图对外暴露接口 getFineSumData 获取罚金数据  getSupplierCooperationRadarChartData 获取雷达图数据
 * @author ys
 * @create 2024-07-06-13:54
 */
@Path("jssdk/SRMKB")
public class SupplierCooperationResources extends BaseResource{
    private static final Log LOG = CtpLogFactory.getLog(SupplierCooperationResources.class);

    private SupplierCooperationService supplierCooperationService = (SupplierCooperationService) AppContext.getBean("supplierCooperationServiceImpl");

    @Path("getFineSumData")
    @POST
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces({ MediaType.APPLICATION_JSON })
    public Response getDiTuDataList(Map<String,Object> parm){
       Map<String, Object> result = supplierCooperationService.getFineSumData();
        return this.ok(JSONObject.toJSONString(result));
    }

    @Path("getSupplierCooperationRadarChartData")
    @POST
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces({ MediaType.APPLICATION_JSON })
    public Response getSupplierCooperationList(Map<String,Object> parm){
        Map<String, Object>result = supplierCooperationService.getSupplierCooperationList();
        return this.ok(JSONObject.toJSONString(result));
    }
}
